<?php
class Zendvn_Filter_AddLink implements Zend_Filter_Interface{
	protected $_findWord;
	protected $_link;
	public function __construct($findWord,$link){
		$this->_findWord = $findWord;
		$this->_link	 = $link;
	}
	public function filter($value){
		$patter = '#'.$this->_findWord.'#ismU';
		$replace = '<a href="'. $this->_link.'">'. $this->_findWord .'</a>' ;
		$valueFiltered = preg_replace($patter,$replace,$value);
		return $valueFiltered;
	}
}